package com.csht.service;

import java.util.Map;

import com.csht.model.CshtTradingSuccess;
import com.csht.page.PagerModel;
import com.csht.vo.my.CshtTradingSuccessVo;

public interface CshtTradingSuccessService {
	
	/**
	 * 根据用户id查找交易成功的数量
	 * @param userId
	 * @return
	 * @throws Exception
	 */
	public Integer getTradingSuccessNumberByUserId(Integer userId) throws Exception;
	
	/**
	 * 根据用户id查找已出售的商品
	 * @param res
	 * @return
	 * @throws Exception
	 */
	public PagerModel<CshtTradingSuccessVo> getTradingSuccessByUserId(Map<String, Integer> res) throws Exception;

	/**
	 * 根据交易成功商品id查找交易成功的商品原id
	 * @param tradingSuccessId
	 * @return
	 * @throws Exception
	 */
	public Integer selectTradingSuccessById(Integer tradingSuccessId) throws Exception;
	
	/**
	 * 根据id删除交易成功的商品
	 * @param tradingSuccessId
	 * @throws Exception
	 */
	public void deleteTradingSuccessById(Integer tradingSuccessId) throws Exception;
	
	/**
	 * 插入一条记录
	 * @param cshtTradingSuccess
	 * @throws Exception
	 */
	public void insertTradingSuccessGoods(CshtTradingSuccess cshtTradingSuccess) throws Exception;
	
}
